<?php /* Smarty version 2.6.26, created on 2013-12-19 09:10:40
         compiled from index/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'geturl', 'index/index.html', 5, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div style="width:80%;float:left;"> 
<?php $_from = $this->_tpl_vars['tenders']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['tender']):
?>
<div id='listtender' style="border-bottom: 1px solid #000;">
    <h3><?php if ($this->_tpl_vars['authenticated']): ?><a href="<?php echo smarty_function_geturl(array('route' => 'viewtender','id' => $this->_tpl_vars['tender']->getId()), $this);?>
"><?php echo $this->_tpl_vars['tender']->name; ?>
</a><?php else: ?><?php echo $this->_tpl_vars['tender']->name; ?>
<?php endif; ?></h3>
    <p>Проект: <?php echo $this->_tpl_vars['tender']->project->name; ?>
</p>
    <p>Отвественный: <?php echo $this->_tpl_vars['tender']->manager; ?>
</p>
</div>
<?php endforeach; endif; unset($_from); ?>
</div>
<div style="width: 20%;float:left;">
 <form method="post" action="<?php echo smarty_function_geturl(array('action' => 'index'), $this);?>
" id="filter-form">
     <fieldset>  <h3>Категории</h3>
   <select name='cats_filter[]' id='cats_filter' data-placeholder="Выбрать категорию" class="chosen-select_cat" multiple style="width:300px;" tabindex="4">
<option value="0" ></option>
<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
<?php if (in_array ( $this->_tpl_vars['cat']->getId() , $this->_tpl_vars['cats_filter'] )): ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
"><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>
    <h3>Проекты</h3>
<select name='projects_filter[]' id='projects_filter' data-placeholder="Выбрать проект" class="chosen-select_project" multiple style="width:300px;" tabindex="4">
<option value='0'></option>
<?php $_from = $this->_tpl_vars['projects']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['project']):
?>
<?php if (in_array ( $this->_tpl_vars['project']->getId() , $this->_tpl_vars['projects_filter'] )): ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
"><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>
    
            <div class="submit">
            <input type="submit" value="Фильтр" />
        </div>
    </fieldset>
 </form>
</div>
<div style='clear: both'></div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>